<template>
    <div>
      <van-list
        v-model="loading"
        :finished="finished"
        @load="onLoad"
        :offset="offset"
      >
        <van-cell v-for="item in miss" :key="item" :title="item + ''" />
      </van-list>
    </div>
</template>

<script>
    export default {
        name: "demoScroll",
        data(){
          return {
            list: [],
            loading: false,
            finished: false,
            offset:10,
          }
        },
      props: ['miss'],
      watch:{

      },
      methods:{
          test(){
            // console.log(this.props["miss"]);
          },
        onLoad() {

          setTimeout(() => {
            for (let i = 0; i < 10; i++) {
              this.list.push(this.list.length + 1);
            }
            this.loading = false;

            if (this.list.length >= 30) {
              this.finished = true;
            }
          }, 500);
        }
      },
      mounted() {
        this.test();
      }

    }
</script>

<style scoped>

</style>
